package com.panda.web.domain.dto;

import java.util.List;

public class CategoryNode {
    private long id;
    private String name;
    private String className;
    private List<CategoryNode> children;

    // Getters and setters
    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public List<CategoryNode> getChildren() {
        return children;
    }

    public void setChildren(List<CategoryNode> children) {
        this.children = children;
    }

    // Method to check if 'children' should be included
    public boolean hasChildren() {
        return children != null && !children.isEmpty();
    }
}
